home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 60.zip / BS1 part 60 / Prof. Calc d2.adf / FAFF.doc < prev   
Text File  |  1991-12-09  |  24KB  |  830 lines

  1. FAFF V2.01 (Last editted October 25, 1991)
  2.  
  3. The following is a description of the file format used by Professional
  4. Calc V1.0, and Advantage (V1.1 and greater).  This file format is also
  5. supported by The Gold Disk Office.  The Advantage and Office Calc
  6. formats are subsets of the Professional Calc format.  Note that this
  7. description does not carry any kind of warranty, and that the
  8. technical support group of Gold Disk will not answer any questions
  9. about it (mainly because they are not aquainted with the file format
  10. specifications). The specification can change at any time without
  11. prior notification; however, we will make sure that we do not obsolete
  12. previous FAFF readers and writers (which include our own).  Gold Disk
  13. is placing this information into the public domain to help third party
  14. developpers or users who wish to read or write ProCalc files into
  15. their own applications.
  16.  
  17. Structure
  18.  
  19. The concepts behind the structure of FAFF (Fast Advantage File Format) are
  20. similiar to those used by Lotus 123 and IFF.  The file format is broken
  21. into chunks.  Each chunk has a one BYTE header number, which describes
  22. what kind of chunk it is.  Next comes the length bits (which are two
  23. BYTEs long), followed by the data.  NOTE: the length bits specify the
  24. length of the data area only.  So one might say that the actual length of
  25. a chunk is the value stored in the two length bits, plus three (size of
  26. header and the length bits).
  27.  
  28. The structure of FAFF allows the file format to be expanded without
  29. obsoleting previous files.  It also makes it easier for third parties to
  30. look at the file format; they only have to save and load information that
  31. is relevant to their application.  What follows is a description of the
  32. chunks currently used by FAFF.  NOTE: the chunks defined are the ONLY
  33. legal chunks.  People who add in their own chunks may have their files
  34. break under future versions of the official Gold Disk FAFF reader program.
  35. However, people may submit new chunk definitions to Gold Disk at an
  36. address listed at the end of the document, and a chunk number will be
  37. supplied to them.
  38.  
  39. When there is a descrepancy between this document, and the actual file
  40. format generated by ProCalc, the latter is to be considered correct.
  41.  
  42.  
  43. Changes in this document:
  44.  
  45. V1.0 : Initial release
  46.  
  47. V1.1 :
  48.   LinkDisk spreadsheet function number listed.
  49.  
  50.   V1.0 of this document incorrectly listed the bits in the Cell Data
  51.   section.  Corrected in this version.
  52.  
  53. V2.0 :
  54.   Covers new additions to the format in Professional Calc:
  55.  
  56.   Pallete Chunk
  57.   Column Width Chunk
  58.   Row Height Chunk
  59.   New Spreadsheet function numbers listed
  60.     - @() and RexxFun.
  61.   New Bits in the Data area of a cell listed
  62.   Password chunk
  63.   Default Row and Column format chunk
  64.   Version Chunk
  65.   Style Tag Chunks
  66.   Outline chunks
  67.   Extended Cell chunks
  68.   Blank Cell Information
  69.  
  70.   Miscelaneous typos fixed, and better descriptions of individual
  71.   chunks added.
  72.  
  73. V2.01
  74.   Natural Recalculation bit documented.
  75.   Typos fixed.
  76.   
  77.  
  78.  
  79.  
  80. Important Notes:
  81.  
  82. All data is stored using 680x0 ordering of the bytes.  An FAFF reader
  83. for IBM class machines would have to swap the the ordering of the
  84. bytes on words.  On long words, they would have to swap the ordering
  85. of bytes in each of the words, then swap the two words.
  86.  
  87. ProCalc (as well as Office and Advantage) store spreadsheet cells in
  88. a sparse matrix.  This means that only cells which contain data are
  89. kept in memory and on disk.  As a result, entire rows and columns
  90. could be empty; these empty cells are not stored on disk in any way.
  91.  
  92. Rows and Columns are stored starting from 1; ie Column A is
  93. represented as 1, B as 2, etc.
  94.  
  95. All formulas in ProCalc are stored in a tockenize Reverse Polish
  96. Notation (RPN) format.  This format is described later on in the
  97. document.
  98.  
  99. All values are unsigned unless specified otherwise.
  100.  
  101.  
  102.  
  103. Chunk Descriptions
  104.  
  105. - End Of File
  106. Header: 0
  107. Length: 0
  108. Description: Signals the end of information of a FAFF file.  MUST be at
  109. the end of the file.
  110.  
  111. - Begin Of File
  112. Header: 1
  113. Length: 4
  114. Description : This chunk is used to identify this file as truly being a
  115. FAFF file.  The data part consists of the magic number 681281268 (in
  116. unsigned long integer format).  MUST be the first chunk.
  117.  
  118. - Dimensions
  119. Header: 2
  120. Length: 8
  121. Description :
  122. Bytes 0-1 : Maximum number of rows of the spreadsheet matrix.  Must be
  123. greater than 0.
  124.  
  125. Bytes 2-3 : Maximum number of columns of the spreadsheet matrix.  Must be
  126. greater than 0.
  127.  
  128. Bytes 4-5 : Higest row that contains spreadsheet data.
  129.  
  130. Bytes 5-7 : Highest column that contains spreadsheet data.
  131.  
  132. - Column Widths (Only used by Office Calc, Graph and Advantage)
  133. Header: 4
  134. Length: 3
  135. Description: Bytes 0-1 are the column number.  Byte 2 is the actual width
  136. of the column.  The only column widths that need to be stored are those
  137. that are different from 9.  This is the column width in characters
  138. (topaz 8 characters to be specific).  This chunk is only found in 1.x
  139. files of Advantage, and in Office Calc and Office Graph.
  140.  
  141. - Named Cell
  142. Header: 8
  143. Length: 20
  144. Description:
  145. Bytes 0-1: Row of the named cell.
  146. Bytes 2-3: Column of the named cell.
  147. Bytes 4-19: NULL terminated string which is the "Name" of this cell.
  148.  
  149. - Named Range
  150. Header: 9
  151. Length: 24
  152. Description:
  153. Bytes 0-1: Row 1 of the named range.
  154. Bytes 2-3: Column 1 of the named range.
  155. Bytes 4-5: Row 2 of the named range.
  156. Bytes 6-7: Column 2 of the named range.
  157. Bytes 8-23: NULL terminated string which is the "Name" of this range.
  158.  
  159. - User Defined Formula
  160. Header: 10
  161. Length: Variable
  162. Description:
  163. Bytes 0-15: Null terminated string which is the name of the formula.
  164. Bytes 16- : RPN Stack Structure (described later on).
  165.  
  166. - Version Number (Only used by ProCalc)
  167. Header: 15
  168. Length:  2
  169. Description: Bytes 0-1 is the version number of the file format.  If
  170. the file is a ProCalc V1.0 file (or above) than the version should
  171. be set to 4.  If the file is intended for previous versions of The
  172. Advantage, then omit the chunk all together.  This chunk is only used
  173. by ProCalc 1.0 and above.
  174.  
  175. - Default formats for a Row or Column (Only used by ProCalc)
  176. Header: 16 (for a column)
  177.         17 (for a row)
  178. Length: 38
  179.  
  180. Description: ProCalc can set up default formats for a row or a column;
  181. this way, the user can pre-format entire rows or columns.
  182.  
  183. Byte  0   : row or column number
  184. Bytes 1-27 : Name of the font
  185. Bytes 28-29 : Y Size of the font
  186. Bytes 30-33 : Cell flags (described later)
  187. Bytes 34-35 : New Cell flags (described later)
  188. Byte  36    : Color number
  189. Byte  37    : Style Tag number
  190.  
  191. - 16 color pallete
  192. Header: 21  (Office Calc, Graph and Advantage use a header of 20)
  193. Length: 96
  194. Description: Bytes 0-5 are the RGB values of color 0 in the pallete.
  195.              Bytes 6-11 are the RGB values of color 1 in the pallete.
  196.              etc.
  197.              2 Bytes for each color value.
  198.  
  199.              NOTE: Previous versions of the FAFF used a header of
  200.                    20 for the pallete.  However, ProCalc has
  201.                    a different pallete, and depends on certain colors
  202.                    being there.  So I, in my infinite wisdom, decided
  203.                    to obsolete the previous pallete definition so old
  204.                    spreadsheets wouldn't mess up the colors.
  205.  
  206. - 256 color pallete (currently ignored)
  207. Header: 22
  208. Length: 1536
  209. Description: Bytes 0-5 are the RGB values of color 0 in the pallete.
  210.              Bytes 6-11 are the RGB values of color 1 in the pallete.
  211.              etc.
  212.  
  213. - Column Width (Only used by ProCalc)
  214. Header: 25
  215. Length:  5
  216. Description: Bytes 0-1 are the column number.  Bytes 2-3 are the actual
  217. width of the column in pixels.  The only column widths that need to be
  218. stored are those that are different from 72.  The last byte is the
  219. flag set  for this column.  (Those flags will be listed at the end of
  220. this document).  This chunk is only used by ProCalc V1.0 and above.
  221.  
  222. - Row Heights (Only used by ProCalc)
  223. Header: 26
  224. Length:  6
  225. Description: Bytes 0-1 : RowNumber
  226.                    2-3 : Width
  227.                    4   : Row flags (same as the column flags)
  228.                    5   : The size of the largest font descender in the
  229.                          row.
  230.  
  231. - Global Window Information
  232. Header: 30
  233. Length: 14
  234. Description:
  235.  
  236. Bytes 0-1: Number of frozen row (if any)
  237. Bytes 2-3: Number of frozen col (if any)
  238. Bytes 4-7: Unused, but reserved. (can be set to zero)
  239. Bytes 8-9: Jump: After return key is hit number of cells to jump.
  240. Bytes 10-11: Bitset of window information.  Defined later on in document.
  241. Byte 12: Boolean value.  If 1, then a row is frozen.  If 0, then no row
  242.          is frozen.
  243. Byte 13: Boolean value.  If 1, then a column is frozen.  If 0, then no
  244.          column is frozen.
  245.  
  246. - Database, and Iterations.
  247. Header: 35
  248. Length: 18
  249. Description:
  250. Bytes 0-1: Number of spreadsheet iterations.
  251. Bytes 2-9: Criteria Range
  252. Bytes 10-17 : Database Range
  253.  
  254. - Graph information
  255. Header: 40-49
  256. Length: Not applicable.
  257. Description: Chunks 40-49 store graphing information for ProCalc.
  258. However, at this time, we are not going to be releasing the description
  259. of the graphing chunk to the public.  At some future point we may, but
  260. not right now.  These chunks will probably change in the future, so I
  261. wouldn't try to hack them out.
  262.  
  263. - Macro File Information
  264. Header: 50
  265. Length: 201
  266. Description: The full path name of a macro file to be auto-loaded.
  267. Only one macro file can be auto loaded per spreadsheet.
  268.  
  269. - Macro Auto Execute
  270. Header: 51
  271. Length: 19
  272. Description: The name of a macro to auto-execute when the spreadsheet
  273. finishes loading.  Only one macro can be auto-executed per spreadsheet,
  274. although ProCalc does allow one macro to call another.  NOTE: If
  275. there is no pre-loaded macro file, then an error will be generated.
  276.  
  277. - ARexx Auto Execute
  278. Header: 52
  279. Length: 401
  280. Description: The full path name of an ARexx file to auto-execute after
  281. the spreadsheet finishes loading.  May include command line parameters
  282. to the ARexx script.  The ARexx script will execute AFTER any macro files
  283. are loaded and executed; ARexx can then be guaranteed to have some macros
  284. in memory if necessary.
  285.  
  286. - Style Tag Chunk (Only used by ProCalc)
  287. Header: 60
  288. Length: Variable
  289. Description: This chunk stores the style tags.
  290.  
  291. The first section of this chunk stores a null terminated string of
  292. variable length which is the name of the font for this style tag.  The
  293. next two bytes store the size of the font.  The next bytes are as
  294. follows:
  295.  
  296. Bytes 0-15 : The name of the StyleTag
  297. Byte  16   : The ID of the styletag (note, there can be up to 255 unique
  298.              style tags in a ProCalc file).
  299. Byte  17   : The Color of the style tag
  300. Bytes 18-21: The Cell BitSet (described later on in the document)
  301. Bytes 22-23: The New Cell BitSet (described later on in the document)
  302.  
  303. - Outline Chunk (Only used by ProCalc)
  304. Header: 65
  305. Length:  8
  306. Description: Stores the information for an outline.
  307.  
  308. Bytes 0-1: The first row or column of the outline.
  309. Bytes 2-3: The last row or column of the outline.
  310. Bytes 3-4: The visible row or column from the outline
  311. Byte  5  : If set to 1, then this is a row oriented outline.  If set to
  312.            0, a column oriented outline.
  313. Byte  6  : If set to 1, then this outline is on (ie the data is hidden).
  314.            If set to 0, then the outline is off.
  315.  
  316. - Password (Only used by ProCalc)
  317. Header: 80
  318. Length: Variable
  319. Description: This chunk store the password (if any) that the user would
  320. need to enter on reading a file.  The password itself is encrypted;
  321. however, to read the spreadsheet, just skip this chunk.  The rest of the
  322. spreadsheet is not encrypted.
  323.  
  324. - Label Cell information.
  325. Header: 100
  326. Length: Variable
  327. Description: Place where a cell containing only text is stored.
  328.  
  329. Bytes 0-1: Row of cell.
  330. Bytes 2-3: Column of cell.
  331. Bytes 4-7: Cell Bitset (described later)
  332. Byte 8: Color of cell
  333. Cell Note : StringPointer type (described later).  Cell note text of the
  334.             cell.
  335. Display   : StringPointer type.  Actual text of the cell.
  336.  
  337. - Blank Cell information (Only used by ProCalc)
  338. Header: 105
  339. Length: Variable
  340. Description: Stores cells that only contain formatting information (such
  341. as when the user selects a blank range, sets the format of that range
  342. to times, then expects any cell entries in that range to be times)
  343.  
  344. Bytes 0-1: Row of cell.
  345. Bytes 2-3: Column of cell.
  346. Bytes 4-7: Cell Bitset (described later)
  347. Byte 8: Color of cell
  348. Byte 9: Actual length of Display area (should be zero).
  349. Byte 10: Error value of cell.
  350. Byte 11: Reserved.
  351. CellNote : StringPointer type.
  352.  
  353.  
  354. - Number Cell information.
  355. Header: 110
  356. Length: Variable
  357. Description: Place where a cell containing only a number is stored.
  358.  
  359. Bytes 0-1: Row of cell.
  360. Bytes 2-3: Column of cell.
  361. Bytes 4-7: Cell Bitset (described later)
  362. Byte 8: Color of cell
  363. Byte 9: Actual length of Display area.
  364. Byte 10: Error value of cell.
  365. Byte 11: Reserved.
  366. Byte 12-19: IEEE number.
  367. CellNote : StringPointer type.
  368. Display : StringPointer type.  Displayed Text.  (Can be set to NULL)
  369.  
  370. - Formula Cell information.
  371. Header: 120
  372. Length: Variable
  373. Description: Place where a formula cell is stored.
  374. Bytes 0-1: Row of cell.
  375. Bytes 2-3: Column of cell.
  376. Bytes 4-7: Cell Bitset (described later)
  377. Byte 8: Color of cell
  378. Byte 9: Actual length of Display area in characters.
  379. Byte 10: Error value of cell.
  380. Byte 11: Reserved.
  381. Byte 12-19: IEEE number.
  382. CellNote : StringPointer type.
  383. Display : StringPointer type.  Displayed Text.  (Can be set to NULL)
  384. Formula : RPN Stack.
  385.  
  386.  
  387. - Extended Cell information. (Only used by ProCalc)
  388. Header: 125
  389. Length: Variable
  390. Description: New information was added to ProCalc's cell structure since
  391. Advantage 1.x.  However, instead of obsoleting the previous FAFF cell
  392. structures, the new information is stored in a separate chunk.  This
  393. chunk should come IMMEDIATELY after the chunk that describes the cell.
  394.  
  395. The first section of the chunk holds a NULL terminated string which is
  396. the font name of this cell.  The next two bytes hold the size of the font.
  397. The next bytes are as follows:
  398.  
  399. Bytes 0-1: The new cell bitset (to be described later)
  400. Bytes 2  : The style number of this cell.
  401.  
  402.  
  403.  
  404. Minimum File:
  405.  
  406. The smallest FAFF file will contain a Begin of File and an End of file
  407. chunk.  The rest will be assumed to be the data from an "Untitled"
  408. ProCalc spreadsheet.
  409.  
  410.  
  411.  
  412.  
  413.  
  414. Description of FAFF Data Types.
  415.  
  416. - Range
  417. Length : 4 Bytes
  418. Description: Bytes 0-1: row1 of the range
  419.              Bytes 2-3: column1
  420.              Bytes 4-5: row2
  421.              Bytes 6-7: column2
  422.  
  423. - String Pointer
  424. Length : Variable
  425. Description:  This is a pseudo variable length NULL terminated string.
  426. The first BYTE is the length of the remaining data portion of the string.
  427. If the first BYTE is 0, then the String Pointer is assumed to be a NULL
  428. Pointer.  NOTE: This implies that strings have a maximum length of 255
  429. characters.
  430.  
  431. - RPN Stack
  432. Length : Variable
  433. Description:  ProCalc internally stores all its formulas in Reverse
  434. Polish Notation.  Here is a description of the RPN stack:
  435.  
  436. The first two bytes of an RPN stack store the size of the data following
  437. the first two bytes (so the total size of the stack is the value from the
  438. first two bytes + 2).  Subsequent data has a one byte header, followed by
  439. the data for that particular header.
  440.  
  441. End of RPN stack
  442. Header: 0
  443. Length: 0
  444. Description: End of RPN formula.
  445.  
  446. IEEE Number
  447. Header: 1
  448. Length: Variable.
  449. Description: There are three sections.  First is a byte, next section is
  450. an IEEE double precision real, third is a string which is the ASCII
  451. representation of the IEEE.  The first byte denotes the length of the
  452. string (NOT including the size of the IEEE real)
  453.  
  454. Cell
  455. Header: 2
  456. Length: 4
  457. Description: Bytes 0-1: the row of the cell
  458.              Bytes 2-3: the column of the cell
  459.  
  460. Range
  461. Header: 3
  462. Length: 8
  463. Description: Bytes 0-1: row1 of the range
  464.              Bytes 2-3: column1 of the cell
  465.              Bytes 4-5: row2 of the range
  466.              Bytes 6-7: column2 of the cell
  467.  
  468. String
  469. Header: 4
  470. Length: Variable
  471. Description: Same format as the String Pointer.
  472.  
  473. Operator
  474. Header: 5
  475. Length: 2
  476. Description: First BYTE is the operator number.
  477.              Second BYTE is the number of parameters for the operator.
  478. NOTE: The second BYTE is only defined if the function accepts a variable
  479. number of parameters (which ProCalc manual describes as a List).
  480. List of formulas and their operator numbers will be given later.
  481.  
  482. User Cell
  483. Header: 6
  484. Length: Variable
  485. Description: String Pointer.  Stores the name of a user defined cell.
  486.  
  487. User Range
  488. Header: 7
  489. Length: Variable
  490. Description: String Pointer.  Stores the name of a user defined range.
  491.  
  492. User Formula
  493. Header: 8
  494. Length: Variable
  495. Description: String Pointer.  Stores the name of a user defined formula.
  496.  
  497.  
  498. Formula Numbers:
  499.  
  500.    sin  =  1
  501.    cos  =  2
  502.    tan  =  3
  503.    sinh =  4
  504.    cosh =  5
  505.    tanh =  6
  506.    acos =  7
  507.    asin =  8
  508.    atan =  9
  509.    asinh = 10
  510.    acosh = 11
  511.    atanh = 12
  512.  
  513.    abs   = 13
  514.    sign  = 14
  515.    int   = 15
  516.    sqrt  = 16
  517.  
  518.    log      = 17
  519.    ln       = 18
  520.    exp      = 19
  521.    degtorad = 20
  522.    radtodeg = 21
  523.    fac      = 22
  524.    fib      = 23
  525.  
  526.    not      = 24
  527.  
  528.    row  = 25
  529.    col  = 26
  530.  
  531.    weekday  = 27
  532.    monthday = 28
  533.    month    = 29
  534.    year     = 30
  535.  
  536.    daverage = 31
  537.    dcount   = 32
  538.    dmax     = 33
  539.    dmin     = 34
  540.    dstdev   = 35
  541.    dsum     = 36
  542.    dvar     = 37
  543.  
  544.    rand    = 38
  545.    e       = 39
  546.    pi      = 40
  547.    true    = 41
  548.    false   = 42
  549.    hour    = 43
  550.    now     = 44
  551.    sec     = 45
  552.    minutes = 46
  553.    today   = 47
  554.  
  555.    mod   = 48
  556.    round = 49
  557.    loga  = 50
  558.    pow   = 51
  559.    cell  = 52
  560.  
  561.    pmt   = 53
  562.    nper  = 54
  563.    pv    = 55
  564.    fv    = 56
  565.    if    = 57
  566.    date  = 58
  567.    time  = 59
  568.    style = 60
  569.    color = 61
  570.  
  571.    range = 62
  572.  
  573.    rate  = 63
  574.  
  575.    fvv   = 64
  576.    npv   = 65
  577.    irr   = 66
  578.  
  579.    hlook = 67
  580.    vlook = 68
  581.  
  582.    index = 69
  583.  
  584.    and   = 70
  585.    or    = 71
  586.    sum   = 72
  587.    avg   = 73
  588.    max   = 74
  589.    min   = 75
  590.    count = 76
  591.    std   = 77
  592.    var   = 78
  593.    xor   = 79
  594.  
  595.    choose = 80
  596.  
  597.    iser = 81
  598.    isnv = 82
  599.    type = 83
  600.  
  601.    lcell = 84
  602.  
  603.    lrange = 85
  604.  
  605.    setcolor = 86
  606.    setstyle = 87
  607.  
  608.    sayif   = 88
  609.    printif = 89
  610.  
  611.  
  612.    times       = 90
  613.    pluse       = 91
  614.    openparen   = 92
  615.    minus       = 93
  616.    unary minus = 94
  617.    divide      = 95
  618.  
  619.    greater          = 96
  620.    greater or equal = 97
  621.    equal            = 98
  622.    less             = 99
  623.    less or equal    = 100
  624.    not equal        = 101
  625.    power operator   = 102
  626.  
  627.   err    = 103
  628.   na     = 104
  629.  
  630.   string = 105
  631.  
  632.   cterm  = 106
  633.   lrate  = 107
  634.   sln    = 108
  635.   term   = 109
  636.  
  637.   ddb    = 110
  638.   syd    = 111
  639.  
  640.   isna     = 112
  641.   isnumber = 113
  642.   isstring = 114
  643.  
  644.   n     = 115
  645.   lcols = 116
  646.   lrows = 117
  647.   s     = 118
  648.  
  649.   clean     = 119
  650.   code      = 120
  651.   datevalue = 121
  652.   length    = 122
  653.   lower     = 123
  654.   upper     = 124
  655.   proper    = 125
  656.   timevalue = 126
  657.   trim      = 127
  658.   value     = 128
  659.  
  660.   exact     = 129
  661.  
  662.   left      = 130
  663.   repeat    = 131
  664.   right     = 132
  665.  
  666.   find  = 133
  667.  
  668.   mid   = 134
  669.  
  670.   replace = 135
  671.  
  672.   charf   = 136
  673.   lhour   = 137
  674.   lminute = 138
  675.   lsecond = 139
  676.  
  677.   linkdisk = 140;
  678.  
  679.   getcell  = 141;  (* The @() operatore *)
  680.  
  681.   rexxfun  = 142;
  682.  
  683.  
  684.  
  685. - Cell Bitset Data  (These are the proper values; v1.0 of this document was wrong)
  686.  
  687.   Bit 0  : Show number in General format
  688.   Bit 1  : Scientific
  689.   Bit 2  : Percent
  690.   Bit 3  : Currency
  691.   Bit 4  : Date
  692.   Bit 5  : Time
  693.   Bit 6  : Boolean
  694.   Bit 7  : Commas
  695.   Bit 8  : If Fixed Decimals, then set.
  696.   Bit 9  : Left Aligned
  697.   Bit 10 : Right Aligned
  698.   Bit 11 : Centered
  699.   Bit 12 : Underlined
  700.   Bit 13 : Bold
  701.   Bit 14 : Italic
  702.   Bit 15 : Set if a formula cell that returns a string.
  703.  
  704.   Bit 16 : Cell Protected (currently unused)
  705.   Bit 17 : Set if a value cell, or a formula with no errors.
  706.   Bit 18 : Set if a formula with no errors
  707.   Bit 19 : Set if cell formula does not reference any cells with greater or
  708.            equal row values.
  709.   Bit 20 : Set if cell formula does not reference any cells with greater or
  710.            equal column values.
  711. NOTE: Bit 19 or 20 are cleared if the formula accesses any of the following
  712.       functions: cell, range, rand, daverage, dcount, dmax, dmin, dstdev,
  713.                  dsum, dvar, hour, today, now, sec, minutes, today, lcell,
  714.                  lrange.
  715.   Bit 21 : Set if this is a criteria cell
  716.   Bit 22 : Set if an ARexx script is attached (path stored in the cell
  717.                                               note)
  718.   Bit 23 : Set if a Transcript extended cell note is attached (path stored
  719.                                                in the cell note)
  720.   Bit 24 : Uses Default format (currently unused)
  721.   Bit 25 : Set if Negative number uses ()
  722.   Bit 26 : reserved for internal use
  723.   Bit 27 : If a number, or a formula, and the display variable needs to
  724.            be updated (to be on the safe side, set it when writing the
  725.            cell).
  726.   Bits 28-31: Store the number of decimal places after the decimal to
  727.               calculate to.  If Bit 28 set, add 8.  If Bit 29 set, add 1.
  728.               If Bit 30 set, add 2.  If Bit 31 set, add 4.
  729.  
  730.  
  731. - New Cell Bitset Data
  732.  
  733.   Bits 0-15 are currently reserved for future use.
  734.  
  735.  
  736. - Header ByteSet Data
  737.  
  738.   Bit 0 : Set if this row/column is to be hidden.
  739.   Bit 1 : Set if a row is to have a bold header (Currently, the only use
  740.           of this is if the row is a control point for an outline).
  741.   Bit 2 : Set if a column is to have an italic header (Currently, the only
  742.           use of this is if the column is a control point for an outline)
  743.   Bit 3 : Set if this is the control point for an outline.
  744.   Bits 4-7 are reserved for future use.
  745.  
  746.  
  747.  
  748. - Window Data
  749.  
  750.   Bit 0  : Set if to recalculate by rows, else by columns
  751.   Bit 1  : Set if to recalculate manually, else automatically.
  752.   Bit 2  : Set if to show the results of formulas, otherwise, displays
  753.            the formulas.
  754.   Bit 3  : Set if to use a hollow cell cursor, otherwise filled.
  755.   Bit 4  : To display a grid, set
  756.   Bit 5  : If Work Bench is to remain open.
  757.   Bit 6  : If set, then use narrator device to repeat what user types in.
  758.   Bit 7  : Set if want to allow ARexx commands.
  759.   Bit 8  : Cursor jumps up on return
  760.   Bit 9  : Cursor jumps down on return
  761.   Bit 10 : Cursor jumps left on return
  762.   Bit 11 : Cursor jumps right on return
  763.   Bit 12 : Set if don't want the "Do you REALLY want to do that"
  764.            requesters.
  765.   Bit 13 : Set if Control Panel is to be displayed.
  766.   Bit 14 : Natural recalculation mode is on.
  767.   Bit 15 : Reserved
  768.  
  769.  
  770.  
  771.  
  772. FAFF Conventions
  773.  
  774. - rows/cols
  775. The first row and column in a matrix is 1, NOT zero.  So, the cell A1
  776. would be referenced as 1,1; B7 as 7,2.
  777.  
  778. - IEEE
  779. Numbers in cells are stored in IEEE double precision format.  Get a book
  780. on the 68881 or 68882 if you want to see the format of this beast.
  781.  
  782. - Rules
  783. Chunks that have a fixed length MUST be of that size.  Anything else is
  784. considered INVALID.
  785.  
  786. ALL information in chunks must be present, otherwise the FAFF reader will
  787. certainly barf.  If you can't fill in ALL the data of a chunk, then don't
  788. write that chunk.
  789.  
  790. Any unauthorized additions to FAFF is considered INVALID.  Micro Systems
  791. Software decided that Analyze! would create its own formula numbers for
  792. functions that Analyze! supports, but 123 realease 1a did not.  As a
  793. result their file format can generate giberish when loaded in 123 vesion
  794. 2.0 and above.  The only information supported by the official Gold Disk
  795. FAFF reader is listed here.  If a developper wishes to add his/her own
  796. chunk, then they should write to
  797.  
  798. Michal Todorovic
  799. RE FAFF
  800. co Gold Disk
  801. PO BOX 789
  802. Streetsville, Mississauga
  803. Ontario, Canada L5M-2C2
  804.  
  805. requesting an official chunk addition.  A complete description of the
  806. data in the chunk must be provided, along with a reason why this chunk
  807. should be officially supported.  We do this only to make sure that every
  808. FAFF reader and writer are compatible.  No chunk definition will be
  809. unreasonably refused.  This document will be updated periodically as new
  810. chunks are added to the FAFF standard, or as errors are found and
  811. corrected.
  812.  
  813.  
  814.  
  815.  
  816. I hope that this information will help you understand the FAFF file
  817. format.
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.                                              Michal Todorovic
  827.                                              Author of The Advantage,
  828.                                              Office Calc, Offic Graph
  829.                                              and Professional Calc.
  830.